	<!-- Start of Page Menu -->

	<div id="page_menu">

		<ul>
		<li><a href="index.php">Home</a></li>
		<li><a href="overons.php">Over Ons</a></li>
		<li><a href="productoverzicht.php">Producten</a></li>
		<li><a href="voorwaarden.php">Voorwaarden</a></li>
		<li><a href="">Acties</a></li>
		</ul>

	</div>

	<!-- End of Page Menu -->


	<!-- Start of Left Sidebar -->

	<div id="left_sidebar">


		<!-- Start of Newsletter Signup Form -->

		<div id="newsletter">
		<div id='specialoffer'>
				<div id='specialoffer_text'>
				<?php $selectaanbieding = "SELECT idPRODUCT FROM  `PRODUCT` WHERE korting >0 ORDER BY korting DESC LIMIT 1";				
						$selectresult = mysql_query($selectaanbieding) or die(mysql_error());
						$selectres = mysql_fetch_assoc($selectresult);
						$idProduct = $selectres['idPRODUCT'];
				echo '<h2>Verschillende acties<strong>, super veel voordeel!</strong></h2>';
				echo '</div>';
	
				echo '<div id="specialoffer_link">';
				
					echo '<a href="productdetail.php?id='.$idProduct.'">Klik hier!</a>';
		
				echo '</div>';
		?>
				<div class='clearthis'>&nbsp;</div>
			</div>
			
		<div>
			<div class="clearthis">&nbsp;</div>
		</div>
			
		</div>



		<!-- Start of Categories Box -->
<?php
	include('db_connect.php');
		$res = mysql_query("SELECT DISTINCT `sub1` AS 'category' FROM `PRODUCT` ORDER BY `category`");
		if(!$res) 
		{
			die("Query failed. Please try again later. ".mysql_error());
		}
		echo '<div id="categories">';
		echo "<div id='categories_header'>";
		echo '<h2>Categorie&euml;n</h2>';
		echo '</div>';
		echo '<ul>';
		
			while($result = mysql_fetch_assoc($res)) {
				#$result1 = $result['category'];
				echo '<li><a href="productoverzicht.php?sub1='.$result['category'].'&sub2=">'.$result['category'].'</a></li>';
			}
			mysql_free_result($res);	
		
			#<li class="last"><a href="">Scanners</a></li>
		
		echo '</ul>';

		echo '<div class="clearthis">&nbsp;</div>';
		echo '</div>';
		?>
		<!-- End of Categories Box -->
	</div>
	<!-- End of Left Sidebar -->